﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;

namespace Irvin_Engine.Sound
{
    public class Music
    {
        private string nameSound = "";
        private float volume = 0.0f;

        Song backgroundMusic = null;

        public Music(string _name, float _volume)
        {
            nameSound = _name;
            volume = _volume;
            backgroundMusic = Kernel.GetInstance().Content.Load<Song>(_name);
        }

        public void Play()
        {
            MediaPlayer.Play(backgroundMusic);
        }

        public void Pause()
        {
            MediaPlayer.Pause();
        }

        public void Resume()
        {
            MediaPlayer.Resume();
        }

        public void Stop()
        {
            MediaPlayer.Stop();
        }
    }
}
